# -*- coding: utf-8 -*-
"""
    :author: FanZhong (范钟)
    :copyright: © 2018 FanZhong <coder.fan@qq.com>
    :license: MIT, see LICENSE for more details.
"""

from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, BooleanField, SubmitField
from wtforms.validators import DataRequired, Length


class LoginForm(FlaskForm):
    username = StringField(
        "账号",
        validators=[DataRequired(), Length(1, 20)],
        render_kw={
            "class":"tpl-form-input",
            "placeholder":"请输入账号"
        }
    )
    password = PasswordField(
        "密码",
        validators=[DataRequired(), Length(6, 32)],
        render_kw={
            "class": "tpl-form-input",
            "placeholder": "请输入密码"
        }
    )
    remember = BooleanField("记住密码")
    submit = SubmitField(
        "登陆",
        render_kw={
            "class":"am-btn am-btn-primary  am-btn-block tpl-btn-bg-color-success  tpl-login-btn"
        }
    )
